<?php

namespace app\controllers\api;

use app\components\StatisticsService;
use app\controllers\api\ApiBaseController;
/**
 * ChannelController implements the CRUD actions for Channel model.
 */
class ChannelController extends ApiBaseController
{
    /**
     * 方法说明：统计首页下载按钮点击次数
     *
     * 作者：张华杰 blues@lonlife.cn
     * 时间：2017-11-13 11:44 AM
     */
    public function actionIndexDown()
    {
        if( StatisticsService::channel(2) ) {
            return $this->ajaxMessage();
        } else {
            return $this->ajaxMessage([], '不作有效记录', 1);
        }
    }
}
